home *** CD-ROM | disk | FTP | other *** search
- on GetCDletter tagFile, discNumber
- set fileObject to 0
- set fileObject to new(xtra("fileio"))
- if not objectp(fileObject) then
- return #fileioNotCreated
- end if
- repeat with i = 67 to 90
- set drive to numToChar(i)
- set myThisPath to string(drive & ":\hidingPlace\" & tagFile & discNumber)
- openFile(fileObject, myThisPath, 1)
- set statusMsg to #noMessage
- set statusMsg to error(fileObject, status(fileObject))
- if statusMsg = "OK" then
- closefile(fileObject)
- set fileObject to 0
- return drive & ":"
- exit
- end if
- end repeat
- repeat with i = 65 to 66
- set drive to numToChar(i)
- set myThisPath to string(drive & ":\hidingPlace\" & tagFile & discNumber)
- openFile(fileObject, myThisPath, 0)
- set statusMsg to error(fileObject, status(fileObject))
- if statusMsg = "OK" then
- closefile(fileObject)
- set fileObject to 0
- return drive & ":"
- exit
- end if
- end repeat
- set fileObject to 0
- return #driveNotFound
- end
-